package com.mycompany.ui;

import java.util.HashMap;
import java.util.Map;
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Tree;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.VerticalSplitPanel;

public class MyLayout extends HorizontalSplitPanel {
	
	private TabSheet tabSheet;
	
	public MyLayout() {
		// TODO Auto-generated constructor stub
		tabSheet = new TabSheet();
		setSecondComponent(createContentPanel());
		setFirstComponent(new AccordionMenu(tabSheet));
		setSplitPosition(20, Unit.PERCENTAGE);
		setSizeFull();
	}

	
	
	private Component createContentPanel() {
		// TODO Auto-generated method stub
	
		VerticalSplitPanel contePanel = new VerticalSplitPanel();
		contePanel.setFirstComponent(createCentralContent());
//		contePanel.setSecondComponent(new Label("RightSide"));
		contePanel.setSplitPosition(100, Unit.PERCENTAGE);
		return contePanel;
		
	}
	
	private Component createCentralContent(){
		
		tabSheet.setSizeFull();		
		return tabSheet;	
	}
	


}
